﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Globalization;

namespace DateParser
{
    class Program
    {
        static void Main(string[] args)
        {
            string input = Console.ReadLine();
            DateTime date = new DateTime();
            string[] formats =  {"dd.mm.yyyy","dd/mm/yyyy","dd.mm.yy","dd/mm/yy"};
            if(DateTime.TryParseExact(input,formats,CultureInfo.InvariantCulture,DateTimeStyles.AdjustToUniversal,out date))
                Console.WriteLine("Day={0:dd} Month={0:mm} Year={0:yyyy}",date);
            else Console.WriteLine("Invalid date!");
        }
    }
}
